import request from './config'

// 获取志愿者个人信息
export const getVolunteerProfile = () => {
  return request({
    url: '/volunteer/profile',
    method: 'get'
  })
}

// 更新志愿者个人信息
export const updateVolunteerProfile = (data) => {
  return request({
    url: '/volunteer/profile',
    method: 'put',
    data
  })
}

// 获取志愿者统计数据
export const getVolunteerStats = () => {
  return request({
    url: '/volunteer/stats',
    method: 'get'
  })
}

// 获取志愿者活动记录
export const getVolunteerActivities = (params) => {
  return request({
    url: '/volunteer/activities',
    method: 'get',
    params
  })
}

// 活动报名
export const signupActivity = (activityId) => {
  return request({
    url: `/volunteer/activities/${activityId}/signup`,
    method: 'post'
  })
}

// 活动签到
export const checkInActivity = (activityId) => {
  return request({
    url: `/volunteer/activities/${activityId}/checkin`,
    method: 'post'
  })
} 
